﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/QuanLy.master" AutoEventWireup="true"
    CodeFile="Quan_Ly_DDHANG.aspx.cs" Inherits="Admin_Quan_Ly_DDHANG" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label ID="thongbaotrantrung" runat="server" Text=""></asp:Label>
    <asp:Panel ID="panel" Visible="true" runat="server">
        <asp:Panel ID="panelxemchitiet" Visible="false" runat="server">
            <asp:GridView ID="xemchitiet" runat="server" AutoGenerateColumns="False" CellPadding="4"
                ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%">
                <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:TemplateField HeaderText="TÊN HÀNG HÓA" SortExpression="tenhh">
                        <ItemTemplate>
                            <asp:TextBox ID="tenhh" Width="90%" ReadOnly="True" runat="server" Text='<%# Eval("tenhh") %>'></asp:TextBox>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="dongiaban" HeaderText="ĐƠN GI&#193;" SortExpression="dongiaban">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="sldat" HeaderStyle-HorizontalAlign="left" HeaderText="SỐ LƯỢNG"
                        SortExpression="sldat">
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
                <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" PageButtonCount="5" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
            <br />
            <hr />
            <br />
        </asp:Panel>
        <asp:GridView ID="gvDuLieu" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%" AllowSorting="True"
            OnPageIndexChanging="gvDuLieu_PageIndexChanging" OnRowCancelingEdit="gvDuLieu_RowCancelingEdit"
            OnRowDeleting="gvDuLieu_RowDeleting" OnRowEditing="gvDuLieu_RowEditing" OnRowUpdating="gvDuLieu_RowUpdating"
            OnSorting="gvDuLieu_Sorting">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="maddh" Visible="true" ReadOnly="True" HeaderText="ID"
                    SortExpression="maddh">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:ImageButton ID="xemchitiet" runat="server" ImageUrl="images/nut/chitiet.gif"
                            PostBackUrl='<%# "~/Admin/Quan_Ly_DDHANG.aspx?man=xem&id=" + Eval("maddh") %>' />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField DataField="makh" ReadOnly="True" HeaderText="MAKH" SortExpression="makh">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="tennguoinhan" ReadOnly="True" HeaderText="T&#202;N NN"
                    SortExpression="tennguoinhan">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="ĐỊA CHỈ NN" SortExpression="diachinn">
                    <ItemTemplate>
                        <asp:TextBox ID="diachinn" runat="server" ReadOnly Text='<%#Eval("diachinn") %>'></asp:TextBox>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField DataField="dienthoainn" ReadOnly="True" HeaderText="ĐIỆN THOẠI NN"
                    SortExpression="dienthoainn">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="NG&#192;Y ĐẶT H&#192;NG" SortExpression="ngaydh">
                    <ItemTemplate>

                        <%# ((DateTime)DataBinder.Eval(Container, "DataItem.ngaydh")).ToString("dd/MM/yyyy") %>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="NG&#192;Y GIAO" SortExpression="ngayhg">
                    <ItemTemplate>
                        <%# ((DateTime)DataBinder.Eval(Container, "DataItem.ngayhg")).ToString("dd/MM/yyyy") %>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Đ&#195; GIAO" SortExpression="dagiao">
                    <ItemTemplate>
                        <center>
                            <font color="red">
                                <%#((bool)Eval("dagiao") == false ? "Chưa" : "Rồi") %></font></center>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <center>
                            <asp:CheckBox ID="dagiao" Checked='<%#Eval("dagiao") %>' runat="server" /></center>
                    </EditItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" CancelText="&lt;img border='0' src='images/nut/cancel.gif'&gt;"
                    DeleteText="X&#211;A" EditText="&lt;img border='0' src='images/nut/sua.jpg'&gt;"
                    InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="&lt;img border='0' src='images/nut/save.gif'&gt;" />
                <asp:CommandField ShowDeleteButton="True" CancelText="KH&#212;NG" DeleteText="&lt;img border='0' src='images/nut/xoa.jpg'&gt;"
                    EditText="SỬA" InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="LƯU" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" PageButtonCount="5" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </asp:Panel>
</asp:Content>
